3.62 \(\int \sin (a+b x) \tan (a+b x) \, dx\)

Optimal. Leaf size=23 \[ \frac{\tanh ^{-1}(\sin (a+b x))}{b}-\frac{\sin (a+b x)}{b} \]

[Out]

ArcTanh[Sin[a + b*x]]/b - Sin[a + b*x]/b

________________________________________________________________________________________

Rubi [A]  time = 0.0147116, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {2592, 321, 206} \[ \frac{\tanh ^{-1}(\sin (a+b x))}{b}-\frac{\sin (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*x]*Tan[a + b*x],x]

[Out]

ArcTanh[Sin[a + b*x]]/b - Sin[a + b*x]/b

Rule 2592

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, (a*Sin[e + f*x])/ff
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \sin (a+b x) \tan (a+b x) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\sin (a+b x)\right )}{b}\\ &=-\frac{\sin (a+b x)}{b}+\frac{\operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (a+b x)\right )}{b}\\ &=\frac{\tanh ^{-1}(\sin (a+b x))}{b}-\frac{\sin (a+b x)}{b}\\ \end{align*}

Mathematica [A]  time = 0.0107391, size = 23, normalized size = 1. \[ \frac{\tanh ^{-1}(\sin (a+b x))}{b}-\frac{\sin (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*x]*Tan[a + b*x],x]

[Out]

ArcTanh[Sin[a + b*x]]/b - Sin[a + b*x]/b

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 31, normalized size = 1.4 \begin{align*} -{\frac{\sin \left ( bx+a \right ) }{b}}+{\frac{\ln \left ( \sec \left ( bx+a \right ) +\tan \left ( bx+a \right ) \right ) }{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(b*x+a)*sin(b*x+a)^2,x)

[Out]

-sin(b*x+a)/b+1/b*ln(sec(b*x+a)+tan(b*x+a))

________________________________________________________________________________________

Maxima [A]  time = 0.990652, size = 46, normalized size = 2. \begin{align*} \frac{\log \left (\sin \left (b x + a\right ) + 1\right ) - \log \left (\sin \left (b x + a\right ) - 1\right ) - 2 \, \sin \left (b x + a\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)*sin(b*x+a)^2,x, algorithm="maxima")

[Out]

1/2*(log(sin(b*x + a) + 1) - log(sin(b*x + a) - 1) - 2*sin(b*x + a))/b

________________________________________________________________________________________

Fricas [A]  time = 1.68546, size = 99, normalized size = 4.3 \begin{align*} \frac{\log \left (\sin \left (b x + a\right ) + 1\right ) - \log \left (-\sin \left (b x + a\right ) + 1\right ) - 2 \, \sin \left (b x + a\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)*sin(b*x+a)^2,x, algorithm="fricas")

[Out]

1/2*(log(sin(b*x + a) + 1) - log(-sin(b*x + a) + 1) - 2*sin(b*x + a))/b

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)*sin(b*x+a)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.24147, size = 49, normalized size = 2.13 \begin{align*} \frac{\log \left ({\left | \sin \left (b x + a\right ) + 1 \right |}\right ) - \log \left ({\left | \sin \left (b x + a\right ) - 1 \right |}\right ) - 2 \, \sin \left (b x + a\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)*sin(b*x+a)^2,x, algorithm="giac")

[Out]

1/2*(log(abs(sin(b*x + a) + 1)) - log(abs(sin(b*x + a) - 1)) - 2*sin(b*x + a))/b